<?php

require_once 'init.php';

$catId = cf\param::get('cat');
$newsId = cf\param::get('id');

$newsCat = cf\query2array('SELECT * FROM cf_news_categories WHERE id=:id OR code=:id',array('id'=>$catId));
$smarty->assign('newsCat',$newsCat);

$news = cf\query2array('SELECT * FROM cf_news WHERE id=:id OR code=:id',array('id'=>$newsId));
$smarty->assign('news',$news);


show(
	'news', 
	$news['dt'].' '.$news['name'], 
	array(
		array('name'=>$newsCat['name'],'path'=>'/'.$newsCat['code']),
		array('name'=>$news['name'])
	)
);

?>